package pair2;

import java.util.ArrayList;


public class PairTest2 {

    public static void main(String[] args) {

        ArrayList<Pair<String, Integer>> array = new ArrayList<>();

        array.add(new Pair<>("Apple", 1));
        array.add(new Pair<>("Banana", 2));
        array.add(new Pair<>("Pear", 3));

        for (int i = 0; i < array.size(); i++) {
            System.out.println(array.get(i).getFirst() + " : " + array.get(i).getSecond());
        }
    }
}
